package com.ihr360.sharedservice.calendar.dto;

import com.ihr360.commons.model.BaseEntity;
import com.ihr360.sharedservice.model.VacationCategory;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.hateoas.Identifiable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;
import java.sql.Date;

/**
 * 基础表 国家法定假日
 */
@Entity
@Table(name = "tab_statutory_vacation")
@DynamicUpdate
public class StatutoryVacation extends BaseEntity implements Identifiable<String> {

    private static final long serialVersionUID = 1424923225997437755L;

    @Column(nullable = false)
    private Date vacationDate;
    /**
     * 类型：0补班、1调休放的假期、2法定假期
     */
    @Column(nullable = false)
    @Enumerated(EnumType.STRING)
    private VacationCategory vacationCategory;
    @Column
    private Boolean isStatutoryHoliday;

    public Date getVacationDate() {
        return vacationDate;
    }

    public void setVacationDate(Date vacationDate) {
        this.vacationDate = vacationDate;
    }

    public VacationCategory getVacationCategory() {
        return vacationCategory;
    }

    public void setVacationCategory(VacationCategory vacationCategory) {
        this.vacationCategory = vacationCategory;
    }

    public Boolean getIsStatutoryHoliday() {
        return isStatutoryHoliday;
    }

    public void setIsStatutoryHoliday(Boolean isStatutoryHoliday) {
        this.isStatutoryHoliday = isStatutoryHoliday;
    }
}